import { Course } from '@libs/db/models/course.model';
import { prop, modelOptions, Ref } from '@typegoose/typegoose';
import { ApiProperty } from '@nestjs/swagger';

@modelOptions({
  schemaOptions: {
    timestamps: true,
  },
})
export class Episode {
  @ApiProperty({ description: '课时标题' })
  @prop()
  name: string;

  @ApiProperty({ description: '上传的文件' })
  @prop()
  file: string;

  @ApiProperty({ description: '该课时所属的课程' })
  @prop()
  course: Ref<Course>;
}
